#!/bin/bash

WORK_PATH=`pwd`

rsync -ruz --progress --delete --exclude-from="${WORK_PATH}/deploy/exclude.list" "${WORK_PATH}/build/tomcat/" dev.ftbj:/home/site/cuba/gtig/tomcat/

scp "${WORK_PATH}/deploy/ftbj/context.xml" dev.ftbj:/home/site/cuba/gtig/tomcat/webapps/app-core/META-INF/

ssh dev.ftbj "/home/site/cuba/gtig/tomcat/bin/shutdown.sh"
sleep 15
ssh dev.ftbj "/home/site/cuba/gtig/tomcat/bin/startup.sh"
